//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_sfunc.sqf"
#include "x_setup.sqf"

private "_objs";
if (vehicle player == player) then {
	GVAR(objectID2) = objNull;
	_objs = nearestObjects [player, ["LandVehicle","Air"], 7];
	if (count _objs > 0) then { GVAR(objectID2) = _objs select 0; };
	if (alive GVAR(objectID2)) then {
		// TYRGHEN
		// (damage GVAR(objectID2) > 0.05 || {fuel GVAR(objectID2) < 1})
		((damage GVAR(objectID2) > 0.02 || !canMove GVAR(objectID2) || {fuel GVAR(objectID2) < 1}) && ("ToolKit" in (items player) || GVAR(string_player) in GVAR(is_engineer)))
	} else {
		false
	}
} else {
	false
}